import { FormComponentProps, GetFieldDecoratorOptions, ValidationRule } from "antd/lib/form/Form";
export interface StandardDatas<T> {
	code: number;
	message: string;
	result: {
		lists: Array<T>;
		current: number;
		pageSize: number;
		total: number;
	};
}

export interface ResponseResult<T> {
	lists: Array<T>;
	current: number;
	pageSize: number;
	total: number;
}

export interface PaginationLists<T> {
	code: number;
	message: string;
	result: {
		lists: Array<T>;
		pageSize: number;
		total: number;
	};
}

export interface DataRow {
	id: number;
	key?: number;
	userName?: string;
	sex?: number;
	interest?: number;
}

export interface UserInfo {
	id: number;
	userName?: string;
	sex?: number;
	age: number;
	address?: string;
}

export interface CityInfo {
	id: number;
	cityName: string;
	mode: number;
	op_mode: number;
	franchisee_name: string;
	city_admins: [
		{
			userName: string;
			userId: number;
		}
	];
	open_time: string;
	update_time: string;
}

export interface OrderInfo {
	id: number;
	order_sn: string;
	bike_sn: string;
	cityName: string;
	user_id: number;
	user_name: string;
	mobile: string;
	distance: number;
	total_time: number;
	total_fee: number;
	status: number;
	start_time: string;
	end_time: string;
	user_pay: number;
}

export interface FromField extends GetFieldDecoratorOptions {
	type: "input" | "select";
	label?: string;
	field: string;
	placeholder?: string;
	initValue?: any;
	width?: string;
	rules?: Array<ValidationRule>;
	[propName: string]: any;
}
export interface StandardFromProps extends FormComponentProps {
	formList: Array<FromField>;
	handleSubmit?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
}
